<template>
    <div class="row">
        <!-- 左侧部分 -->
        <div class="col-md-8">
            <app-header-new></app-header-new>
        </div>
        <!-- 右侧部分 -->
        <div class="col-md-4">
            <h3 class="text-muted my-5">菜单</h3>
            <table class="table">
                <thead class="table table-default">
                    <tr>
                        <th>品种</th>
                        <th>删除</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="item in getItemlist" :key="item.id">
                        <td>{{item.name}}</td>
                        <td><button class="btn btn-outline-danger btn-sm">&times;</button></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</template>

<script>
import axios from 'axios'
import HeaderNews from './HeaderNews.vue'
export default {
    data(){
        return{
            getItemlist:[]
        }
    },

    components:{
        'app-header-new':HeaderNews
    },

    created(){
        axios.get('/menu').then(res=>{
           this.getItemlist =res.data.data
        })

    }
}
</script>

